///
/// This method counts distinct values in a table column.
///
public int GetCount()
{
OrderBy oB = new OrderBy(false,true);
oB.Add(${${Table Name}ClassName}.${Field Name},BaseClasses.Data.OrderByItem.OrderDir.Asc);
string [] myarray = ${${Table Name}ClassName}.GetValues(${${Table Name}ClassName}.${Field Name}, new WhereClause(), oB, ${${Table Name}ClassName}.MAX_BATCH_SIZE);
return myarray.Length;
}
|